# encoding: utf-8
import platform

from modelscope import snapshot_download

MODEL_PATH = r'D:\\models' if platform.system() == 'Windows' else r'/app/models'


if __name__ == '__main__':
    cache_dir = MODEL_PATH + '//cache'
    # 要素提取模型
    snapshot_download(model_id=r'damo/nlp_deberta_rex-uninlu_chinese-base', cache_dir=cache_dir)
    # 错字审查模型
    snapshot_download(model_id=r'damo/nlp_bart_text-error-correction_chinese-law', cache_dir=cache_dir)
    # 大模型7B
    snapshot_download(model_id='qwen/Qwen1.5-7B-Chat-GPTQ-Int4', cache_dir=cache_dir)
    # 大模型14B
    snapshot_download(model_id='qwen/Qwen1.5-14B-Chat-GPTQ-Int4', cache_dir=cache_dir)
    print('模型下载完成')